import abc
import tensorflow as tf


class Model(metaclass=abc.ABCMeta):

    @abc.abstractmethod
    def build_model(self):
        pass

    @staticmethod
    def print_nodes(remove_training_nodes=False):
        default_graph = tf.get_default_graph().as_graph_def()
        if remove_training_nodes:
            output_graph_def = tf.graph_util.remove_training_nodes(default_graph, protected_nodes=None)
            [print(n.name) for n in output_graph_def.node]
        else:
            [print(n.name) for n in default_graph.node]

